<template>
  <div>
    <h2 class="badge-title">
      合作案例
    </h2>
      <div class="badge-list">
        <div class="badge-item" v-for="(item, idx) in casesList" :key="idx">
          <img :src="item.img" :alt="item.name" />
          <div class="badge-name">{{ item.name }}</div>
        </div>
      </div>
    </div>
    
</template>

<script>
export default {
  name: 'ProductsIndex',
  data() {
    return {
      casesList: [
        {
          img: require('@/assets/image/case.jpg'),
          name: '法国客户'
        },
        {
          img: require('@/assets/image/case.jpg'),
          name: '德国客户'
        },
        {
          img: require('@/assets/image/case.jpg'),
          name: '印度客户'
        },  
        {
          img: require('@/assets/image/case.jpg'),
          name: '阿联酋客户'
        },
        
      ]
    }
  },
  computed: {
  }
}
</script>

<style scoped>
.badge-title {
  font-size: 24px;
  font-weight: bold;
  color: #1b4e54;
  margin-bottom: 18px;
  border-left: 4px solid #1b4e54;
  padding-left: 12px;
  letter-spacing: 1px;
}
.badge-list {
  display: flex;
  flex-wrap: wrap;
  gap: 40px 40px;
  justify-content: flex-start;
}
.badge-item {
  width: calc(25% - 30px);
  display: flex;
  flex-direction: column;
  align-items: center;
  background: transparent;
  padding: 20px 10px;
  transition: all 0.3s ease;
}
.badge-item:hover {
  transform: translateY(-2px);
}
.badge-item img {
  width: 200px;
  height: 200px;
  object-fit: contain;
  border-radius: 8px;
  background: #f5f5f5;
}
.badge-name {
  margin-top: 16px;
  font-size: 16px;
  font-weight: 500;
  text-align: center;
  color: #333;
}
@media (max-width: 900px) {
  .badge-list {
    justify-content: center;
    gap: 30px 20px;
  }
  .badge-item {
    width: calc(50% - 15px);
    padding: 15px 8px;
  }
  .badge-item img {
    width: 180px;
    height: 180px;
  }
}

@media (max-width: 768px) {
  .badge-title {
    font-size: 20px;
    margin-bottom: 15px;
    padding-left: 10px;
  }
  
  .badge-list {
    gap: 20px 15px;
  }
  
  .badge-item {
    width: calc(50% - 10px);
    padding: 12px 6px;
  }
  
  .badge-item img {
    width: 140px;
    height: 140px;
  }
  
  .badge-name {
    font-size: 14px;
    margin-top: 12px;
  }
}

@media (max-width: 480px) {
  .badge-title {
    font-size: 18px;
    margin-bottom: 12px;
    padding-left: 8px;
  }
  
  .badge-list {
    gap: 15px 10px;
    justify-content: center;
  }
  
  .badge-item {
    width: calc(50% - 5px);
    padding: 10px 5px;
  }
  
  .badge-item img {
    width: 160px;
    height: 160px;
  }
  
  .badge-name {
    font-size: 13px;
    margin-top: 10px;
  }
}
</style> 